<tpl var layoutBody={ />
<div data-identity="sys:message" data-table="sys_message">
	<div class="layui-breadcrumb">
		<a href="/manage/index.jspx">首页</a>
		<a href="/manage/sys/message/index.jspx">消息管理</a>
		<a href="javascript:;"> <cite>添加</cite></a>
	</div>
	<hr>
	<fieldset class="layui-elem-field">
		<legend>添加 消息管理</legend>
		<div class="layui-field-box">
			<form class="layui-form" action="save.json?oper=create" lay-filter="mSysMessageForm">
				<div class="layui-form-item" data-type="int" data-isnull="NO" data-name="type">
					<label class="layui-form-label">消息类型：0普通消息，1系统消息：</label>
					<div class="layui-input-block">
						<input type="text" name="type" placeholder="请输入消息类型：0普通消息，1系统消息" autocomplete="off" class="layui-input">
					</div>
				</div>
				<div class="layui-form-item" data-type="int" data-isnull="NO" data-name="state">
					<label class="layui-form-label">状态：0未推送,1未读,2已读：</label>
					<div class="layui-input-block">
						<input type="text" name="state" placeholder="请输入状态：0未推送,1未读,2已读" autocomplete="off" class="layui-input">
					</div>
				</div>
				<div class="layui-form-item" data-type="varchar" data-isnull="NO" data-name="title">
					<label class="layui-form-label">消息标题：</label>
					<div class="layui-input-block">
						<input type="text" name="title" placeholder="请输入消息标题" autocomplete="off" class="layui-input">
					</div>
				</div>
				<div class="layui-form-item" data-type="varchar" data-isnull="YES" data-name="abstr">
					<label class="layui-form-label">消息摘要：</label>
					<div class="layui-input-block">
						<input type="text" name="abstr" placeholder="请输入消息摘要" autocomplete="off" class="layui-input">
					</div>
				</div>
				<div class="layui-form-item" data-type="varchar" data-isnull="YES" data-name="param">
					<label class="layui-form-label">消息参数：</label>
					<div class="layui-input-block">
						<input type="text" name="param" placeholder="请输入消息参数" autocomplete="off" class="layui-input">
					</div>
				</div>
				<div class="layui-form-item" data-type="text" data-isnull="YES" data-name="content">
					<label class="layui-form-label">消息内容：</label>
					<div class="layui-input-block">
						<input type="text" name="content" placeholder="请输入消息内容" autocomplete="off" class="layui-input">
					</div>
				</div>
				<div class="layui-form-item" data-type="varchar" data-isnull="NO" data-name="sender">
					<label class="layui-form-label">发件人：</label>
					<div class="layui-input-block">
						<input type="text" name="sender" placeholder="请输入发件人" autocomplete="off" class="layui-input">
					</div>
				</div>
				<div class="layui-form-item" data-type="varchar" data-isnull="NO" data-name="receive">
					<label class="layui-form-label">收件人：</label>
					<div class="layui-input-block">
						<input type="text" name="receive" placeholder="请输入收件人" autocomplete="off" class="layui-input">
					</div>
				</div>
				<div class="layui-form-item" data-type="datetime" data-isnull="YES" data-name="create_time">
					<label class="layui-form-label">创建时间：</label>
					<div class="layui-input-block">
						<input type="text" name="createTime" placeholder="请输入创建时间" autocomplete="off" class="layui-input">
					</div>
				</div>
				<div class="layui-form-item">
					<div class="layui-input-block">
						<button class="layui-btn" lay-submit lay-filter="mSysMessageForm">立即提交</button>
					</div>
				</div>
			</form>
		</div>
	</fieldset>
</div>
<tpl }; />

<tpl var layoutScript={ />
<script>
	layui.use([ 'element', 'form' ], function() {
		// 绑定表单提交事件
		layui.form.on('submit(mSysMessageForm)', function(data) {
			$.postLoading('save.json?oper=create', data.field, function(res) {
				layer.msg(res.message, {
					icon: 1,
					time: 1500
				}, function () {
					history.back();
				});
			});

			return false;
		});
	});
</script>
<tpl }; />
<tpl include( "../../tpl/layout-scroll.html",{identity:"sys:message",layoutBody:layoutBody,layoutScript:layoutScript}){}/>